package com.lianbang.staff.http.api

import cn.ubest.mvvmcore.bean.ListWrapper
import cn.ubest.mvvmcore.bean.ResultWrapper
import cn.ubest.mvvmcore.bean.Wrapper
import com.lianbang.staff.bean.OrderListBean
import com.lianbang.staff.bean.ShopOrderDetailBean
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.POST

/**
 * Created by maoqi on 2021/1/14.
 */
interface OrderApi {
    //销售订单列表
    @FormUrlEncoded
    @POST("salesman_api/user_allorder_list")
    suspend fun getOrderList(
        @Field("status") status: Int,
        @Field("page") page: Int,
        @Field("limit") limit: Int,
        @Field("order") order: String
    ): ListWrapper<OrderListBean>

    //门店订单详情
    @FormUrlEncoded
    @POST("salesman_api/user_orderinfo")
    suspend fun getShopOrderDetail(
        @Field("id") id: Int
    ): ResultWrapper<ShopOrderDetailBean>

    //门店订单确认
    @FormUrlEncoded
    @POST("salesman_api/user_changeorder")
    suspend fun confirmShopOrder(
        @Field("id") id: Int,
        @Field("status") status: Int,
        @Field("pay_price") pay_price: Float
    ): Wrapper
}